<h3 class="top-contributors-heading">
  {{theme-i18n "top_contributors.heading"}}
  <span>{{theme-i18n "top_contributors.ending"}}</span>
</h3>

<div class="top-contributors--container">
  {{#each topContributors as |item index|}}
    <div class="top-contributors--user">
      <span
        data-user-card={{item.user.username}}
        class="top-contributors--user-badge"
      >
        <span class="top-contributors--user-index">
          {{#if (eq index 0)}}
            <img src="https://www.openkylin.top/public/images/forum/%E6%8E%92%E5%90%8D%E7%AC%AC%E4%B8%80.png" alt="">
          {{else if (eq index 1)}}
            <img src="https://www.openkylin.top/public/images/forum/%E6%8E%92%E5%90%8D%E7%AC%AC%E4%BA%8C.png" alt="">
          {{else if (eq index 2)}}
            <img src="https://www.openkylin.top/public/images/forum/%E6%8E%92%E5%90%8D%E7%AC%AC%E4%B8%89.png" alt="">
          {{else}}
            {{this.incremented index}}
          {{/if}}
        </span>
        
        {{avatar item.user imageSize="28"}}
        <span class="top-contributors--user-badge-username">{{html-safe item.user.username}}</span>
      </span>
      <span class={{concat "top-contributors--user-likes order--" this.order}}>
        {{#if (eq this.order "likes_received")}}
          {{!-- {{d-icon "heart"}} --}}
          {{theme-i18n "top_contributors.heart"}}
          {{!-- 如果index小于3，则显示#E84D3B，否则显示#236DE6 --}}
          <span style={{if (lt index 3) "color: #E84D3B" "color: #236DE6"}}>{{item.likes_received}}</span>
          {{theme-i18n "top_contributors.num"}}
        {{else}}
          {{!-- {{d-icon "heart"}} --}}
          {{theme-i18n "top_contributors.heart"}}
          {{item.likes_given}}
          {{theme-i18n "top_contributors.num"}}
        {{/if}}
      </span>
    </div>
  {{/each}}
</div>

<a
  class="top-contributors--view-all"
  href={{this.viewAllUrl}}
>
  {{theme-i18n "top_contributors.view_all"}}
</a>